fixing none error