fixed empty block handling