Fixed #256 - check side before executing sleep stuff