Removed debug code and implemented anti reload