fixed an error on initialization