xdebug and bug fixing