Fixed bug causing crash when ordering pills list