Fixed a bug because of the wrong order of constructor parameters