Minor fixes

See commits for more information