Fixed compilation errors for non-blocking versions, added option to specify block size