Attempt for fixing issues #48 #58 and #82