fixes some minor edge case bugs discovered after submission