prevent nil expeption