Fixed error in decorator