fix java.lang.ArrayIndexOutOfBoundsException.
add stage context synchronized.