project page bug fixed - put in check (if(lastRecord)) and fixed how
lastRecord is calculated.