Some last minute bug fixes