Fixed recording bug. Added auto-minimize/maximize functionality.