Added better support for compact mode
Added better support for compact mode