Fixed problems when nested bound models changed and added tests