mining bug fixed

This is a fix of mining process. Important in case block size is above penalty free block size.