Still some problems with casting