attempted to fix null value problem