fix type bugs and sublime open file bugs