Debug bug fixed