Multiple changes for various bug fixes