multiple bug fixes