Fix multiple issues