fix angular variables flash issue