Added context to the apply to allow for prototypes etc