CHANGE: various bug fixes