cleanup, bug fix