Resolve a reported crash, fix deprecated method call