fixing debug bug