BugFix: Fixed cast exception