Fixed some bugs related to programmatic access