Define params before using it, should fix #3