Direct casting functions.