Fixed bug. Added clearing array of wp