Fixed null Errors