undefined check fix