Fix PushData and add RemovePattern function