porting master to release and updating changes to beta2