Fixed more effective code