Fixed some variable initialization