Implemented issues #79 and #80