Some bug fixes and enhancements

Fixed some interface bugs.