some debugging, fixing and sugar