Setting the satus register correctly