fixed isinstance call