Fixed bug in stardetect