Fixed  a couple of bugs from latest develop. Added some changes for Raet changes