Doing some debug, there seem to be lots of bugs