try to handle nan