fixed initial running bug