Better type casting
Grid lock on thread start fixed