fixing error debug