fixed timing issue and width bug