Add bug fixes for this fork