Removed useless code, possibly fixed something.