Removed some buggy code