Compile fix and check for existance of model