corrected another critical error
corrected errors
everything seems to work, merging