Fixes

Some fixes to @KamilKalfas changes