Added check for highest block