Fixed issues with destroying and creating machines