bug fixes, towards data taking