Lifted some bugs, hopefully clean now