remove casting as it has strange side effects