Fixed bug with last