some cleanup
fixed mini-bug