fix isinstance check in render