Fixed bug on uninitialized variables.