inline support and fix bugs