Fixed bug in putInstance
Initial structure