#260 refixing code errors