made bug fixes