Fixed wrong condition
Fixed wrong range