Fixed bug with spinner not showing correct value