Fixed bug when changing status from 'degraded' to 'down' and a bug in the oracle repository