minor bug fix, print bugs and more