Bugs Fixs

Fixes several bugs, but wallclocklimit commit has to be valided