Added test for self refresh, fixed bug #22