Fix bug in listing all declared types