[Fix] Bug fixes and improvements.