Fixed up runtime errors but we are receiving illegal invocation