fixed a bug in blocking in X and added finer tuning