Fix: function at wrong place