fix variable initialization