Fixed an error caused by passing a null string
Added debug things