Remove code in wrong location