fix issues with creating instances