Merge all kennydude's bug fixes