Debug error fixed