Bug fixing attempt