moved cleanup inside build block, fixed typo