Added error check in getLaps call.