Added pause mode and fixed minimising error close #18