Issues #216, #217

Some fixes to @KamilKalfas changes