added stuck check
merged
added alignment counter