Fixed code for