Fixed bug in decorator