added console command and started bugfixing