fix few bugs after merge / Seems like a lot are remaining