Fix multiple issues

See commits