fixed null errors
fixed merge conflicts