fixed missing casting