fix restarting
support multiple profiles; close #9