big bug fixes