A bug fixes