Added last few checks for lock/unlock status