fixes #735 #1051 #1053 #1054 #1056 #1057 

fixes #735 #1051 #1053 #1054 #1056 #1057