fixed some issues in interactive mode