Fixed debugging issues