Added some missing functionalities to the play logic.