fix method casting