fixed undefined errors on first load