More bug fixes, as always