Activity creation bug fix