Fixed error when method doesn't have any parameters.