Fixes for terminal on ubuntu