leal's fixes